/* Categories Panel */
$("#category").control({
    type: CATEGORY_CONTROL, 
    subNav: "#category-sub-nav"
});
document.addEventListener('DOMContentLoaded', function(){
    itemSlider = new iScroll('item-slider', {
        useTransform: false,
        hScrollbar: false,
        vScrollbar: false,
        onBeforeScrollStart: function (e) {
            var target = e.target;
            while (target.nodeType != 1) target = target.parentNode;

            if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA')
                e.preventDefault();
        }
    });
}, false);
$("body").everyTime(1000, function (i) {
    $('#item-slider').children().autoWidth({
        margin: 20
    });
    itemSlider.refresh();
}, 1);